b6c99e0901fde933b273be1833fc70b06a32173f,integration/src/integration/java/pl/allegro/tech/hermes/integration/PublishingTest.java,PublishingTest,shouldNotPublishInvalidMessageWithJsonSchema,#,278
Before Change
public void shouldNotPublishInvalidMessageWithJsonSchema() {
// given
String messageInvalidWithSchema = "{\"id\": \"shouldBeNumber\"}";
operations.buildTopic(
topic("schema.topic.invalidJson").withValidation(true).withMessageSchema(schema).withContentType(JSON).build());
//when
Response response = publisher.publish("schema.topic.invalidJson", messageInvalidWithSchema);
After Change
public void shouldNotPublishInvalidMessageWithJsonSchema() {
// given
String messageInvalidWithSchema = "{\"id\": \"shouldBeNumber\"}";
Topic topic = operations.buildTopic(topic("schema.topic.invalidJson")
.withValidation(true)
.withContentType(JSON)
.build()
);
operations.saveSchema(topic, schema);
//when
Response response = publisher.publish("schema.topic.invalidJson", messageInvalidWithSchema);